package com.example.time.handler;

import com.example.time.pojo.UnixTime;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;

/**
 * @author linfeng
 * @date 2022/1/17 16:34
 */
public class TimeClientHandler extends ChannelInboundHandlerAdapter {

    @Override
    public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception {

        UnixTime unixTime = (UnixTime) msg;
        System.out.println("时间：" + msg);

        ctx.close();
    }

}
